<template>
  <a-modal
    title="修改"
    :visible="iswriteBankVersion"
    @cancel="cancel"
    @ok="ok"
  >
  
  <a-form-model class="fromModels" ref="editbankDickModel"  :model="bankDickFormDatas"  layout="vertical" 
  :labelCol="{span: 6}" :wrapperCol="{span: 16}">
      <a-form-model-item label="背景色">
        <input type="color" style="width: 50px;" v-model="bankDickFormDatas.background_color" />
      </a-form-model-item>
      <a-form-model-item label="描述">
        <upImages :url.sync="bankDickFormDatas.logo"></upImages>
      </a-form-model-item>
    </a-form-model>
  </a-modal>
</template>

<script>
import { editBankDickListApi } from '@/api/dict.js'
export default {
  name: 'writeBankDiogla',
  components: {
  },
  data() {
    return {
      iswriteBankVersion:false,
      bankDickFormDatas:{
        background_color:"",
        ids:"",
        logo:"",
      }
    }
  },
  created() {
  },
  computed:{
  },
  methods: {
    openwriteBankDiogla(json){
      this.bankDickFormDatas={
        background_color:json.background_color,
        ids:json.id,
        logo:json.logo,
        brand_id: process.env.VUE_APP_BRAND_ID,
      }
      this.iswriteBankVersion=true
    },
    cancel(){
      this.iswriteBankVersion=false
    },
    ok(){
      editBankDickListApi(this.bankDickFormDatas).then(res=>{
        this.$message.success("操作成功");
        this.cancel()
        this.$emit("changes")
      })
    },
  }
}
</script>

<style lang="less" scoped>

</style>
